package com.example.springboot;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @author galen
 */
@Controller
public class TestController {
    @RequestMapping("/test")
    public String test(Map<String, Object>map) {
        // 通过map向前台页面传递数据- templates/test.html
        map.put("name", "Java 编程学习");
        return "test";
    }
}
